<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<title>JQuery Add Demo</title>
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
		crossorigin="anonymous">
</head>

<body>
	<div class="container">
		<div class="card row p-2 mt-2">
			<div class="card-header">
				项目2：Bootstrap及JQuery技术的加法演示
			</div>
			<div id="cardbody" class="card-body d-lg-flex flex-wrap justify-content-around">
				<h5 class="card-title">作者:gCode Teacher 标签</h5>
				<p id="tip" class="card-text">
					<span class="badge badge-secondary">教师</span>
					<span class="badge badge-success">攻城狮</span>
					<span class="badge badge-danger">码农</span>
					<span class="badge badge-warning">体育爱好者</span>
				</p>
				<a href="http://www.gcode.top" class="btn btn-primary">格玛拓普</a>
			</div>
			<div>
				<div class="row">

					<div class="col input-group input-group-lg mb-2">
						<div class="input-group-prepend">
							<label class="input-group-text" for="First">加数:</label>
						</div>
						<input id="First" step="0.01" min="0" max="100" type="number" value="0" class="form-control" />
					</div>

					<div class="col-sm input-group input-group-lg mb-2">
						<div class="input-group-prepend">
							<label class="input-group-text" for="Second">加数:</label>
						</div>
						<input id="Second" step="0.01" min="0" max="100" type="number" value="0" class="form-control" />
					</div>

					<div class="col-md input-group input-group-lg mb-2">
						<div class="input-group-prepend">
							<span class="input-group-text">和值:</span>
						</div>
						<input id="Sum" readonly step="0.01" min="0" max="100" type="number" value="0" class="form-control" />
					</div>
				</div>

				<button type="button" class="btn btn-success" id="btn">计算</button>
			</div>
		</div>
	</div>
	<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
		crossorigin="anonymous"></script>
		<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
			crossorigin="anonymous"></script>
			<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
				crossorigin="anonymous"></script>
				<script>
					$(function(){
        $("#btn").click(function(){
        	var a=$("#First").val();
     		var b=$("#Second").val();
     		var c=parseFloat(a)+parseFloat(b);
     		$("#Sum").val(c);
     		$("#he").val(c)
        })
    });
				</script>
</body>

</html>